package com.heima.article.controller.v1;

import com.heima.article.service.ApArticleService;
import com.heima.model.article.dtos.ArticleInfoDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 加载文章行为-数据回显controller
 */
@Slf4j
@RestController
@RequestMapping("/api/v1/article")
public class LoadArticleBehaviorController {

    @Autowired
    private ApArticleService apArticleService;
    /**
     * 用户行为:加载文章行为-数据回显
     * @return
     */
    @PostMapping("/load_article_behavior")
    public ResponseResult handlerLoadArticleBehavior(@RequestBody ArticleInfoDto dto){
        log.info("加载文章行文-数据回显,入参:{}",dto);
        //调用service

        return apArticleService.handlerLoadArticleBehavior(dto);
    }
}
